package net.models;

// Generated 16 avr. 2013 13:52:25 by Hibernate Tools 3.4.0.CR1

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Rapportvisite generated by hbm2java
 */
@Entity
@Table(name = "rapportvisite", catalog = "gsbcr")
public class Rapportvisite extends AbstractModel {

	private Integer id;
	private Praticien praticien;
	private Visiteur visiteur;
	private Medicament medicament;
	private Date rapDate;
	private String rapBilan;
	private String rapMotif;
	private Offrir offrir;

	public Rapportvisite() {
	}

	public Rapportvisite(Praticien praticien, Visiteur visiteur) {
		this.praticien = praticien;
		this.visiteur = visiteur;
	}

	public Rapportvisite(Praticien praticien, Visiteur visiteur,
			Medicament medicament, Date rapDate, String rapBilan,
			String rapMotif, Offrir offrir) {
		this.praticien = praticien;
		this.visiteur = visiteur;
		this.medicament = medicament;
		this.rapDate = rapDate;
		this.rapBilan = rapBilan;
		this.rapMotif = rapMotif;
		this.offrir = offrir;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		Integer oldValue = this.id;
		this.id = id;
		firePropertyChange("id", oldValue, id);
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "praNum", nullable = false)
	public Praticien getPraticien() {
		return this.praticien;
	}

	public void setPraticien(Praticien praticien) {
		Praticien oldValue = this.praticien;
		this.praticien = praticien;
		firePropertyChange("praticien", oldValue, praticien);
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "visMatricule", nullable = false)
	public Visiteur getVisiteur() {
		return this.visiteur;
	}

	public void setVisiteur(Visiteur visiteur) {
		Visiteur oldValue = this.visiteur;
		this.visiteur = visiteur;
		firePropertyChange("visiteur", oldValue, visiteur);
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "rapMedic")
	public Medicament getMedicament() {
		return this.medicament;
	}

	public void setMedicament(Medicament medicament) {
		Medicament oldValue = this.medicament;
		this.medicament = medicament;
		firePropertyChange("medicament", oldValue, medicament);
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "rapDate", length = 19)
	public Date getRapDate() {
		return this.rapDate;
	}

	public void setRapDate(Date rapDate) {
		Date oldValue = this.rapDate;
		this.rapDate = rapDate;
		firePropertyChange("rapDate", oldValue, rapDate);
	}

	@Column(name = "rapBilan")
	public String getRapBilan() {
		return this.rapBilan;
	}

	public void setRapBilan(String rapBilan) {
		String oldValue = this.rapBilan;
		this.rapBilan = rapBilan;
		firePropertyChange("rapBilan", oldValue, rapBilan);
	}

	@Column(name = "rapMotif")
	public String getRapMotif() {
		return this.rapMotif;
	}

	public void setRapMotif(String rapMotif) {
		String oldValue = this.rapMotif;
		this.rapMotif = rapMotif;
		firePropertyChange("rapMotif", oldValue, rapMotif);
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "offrir")
	public Offrir getOffrir() {
		return this.offrir;
	}

	public void setOffrir(Offrir offrir) {
		Offrir oldValue = this.offrir;
		this.offrir = offrir;
		firePropertyChange("offrirs", oldValue, offrir);
	}

}
